import { request } from '@/utils/request'

/**
 * 获取首页数据
 */
export function indexData(success) {
	request({
		url: '/api.app/v1/web/home'
	}, function(data) {
		success && success(data)
	})
}

/**
 * 获取机构列表
 */
export function institution(success) {
	request({
		url: '/api.app/v1/organizationInfos/OrganizationInfoList',
		method: 'get',
		params: {
			page: 1,
			limit: 100
		}
	}, function(data) {
		success && success(data)
	})
}

/**
 * 添加建议
 */
export function addSuggest(params, success) {
	request({
		url: '/api.app/v1/cmsSuggests/addSuggest',
		method: 'post',
		params: params
	}, function(data) {
		success && success(data)
	})
}

/**
 * 支付测试
 */
export function pay(success) {
	request({
		url: '/index/jsApiPay'
	}, function(data) {
		success && success(data)
	})
}
